<template>
  <i-frame :src="url" />
</template>
<script>
  import iFrame from "@/components/iFrame/index";
  import {getUserProfile} from "@/api/system/user";
  export default {
    name: "file",
    components: { iFrame },
    data() {
      const user = null;
      const userid = this.$store.state.user.userid;
      const username = this.$store.state.user.name;
      const fileipaddress = this.$store.state.user.fileipaddress;
      console.log(userid+"1"+username)
      return {
        url: 'http://'+fileipaddress+':9091/api/user/login?userId='+userid+"&username="+username+"'"
      };
    },
    created() {
      this.getUser();
    },
    methods: {
      getUser() {
        getUserProfile().then(response => {
          this.data().user = response.data;
        });
      }
    }
  };
</script>
